Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #62 by excluding empty affected files collection #197

Merged
merged 1 commit into from
Mar 2, 2017

Conversation

yestin
Copy link
Contributor

@yestin yestin commented Mar 19, 2016

Jenkins Repo plugin adds an "empty" change log when there is a
new project added or removed, e.g.:

path: local/path
serverPath: server/path
revision: null
authorName: null
authorEmail: null
authorDate: null
committerName: null
committerEmail: null
committerDate: null
commitText: This project was added from the manifest.
modifiedFiles: null

When Slack plugin tries to add the "null" affected files, it gets a
NullPointerException error.

Fix the error by not adding any empty affected files collection.

Jenkins Repo plugin adds an "empty" change log when there is a
new project added or removed, e.g.:

path: local/path
serverPath: server/path
revision: null
authorName: null
authorEmail: null
authorDate: null
committerName: null
committerEmail: null
committerDate: null
commitText: This project was added from the manifest.
modifiedFiles: null

When Slack plugin tries to add the "null" affected files, it gets a
NullPointerException error.

Fix the error by not adding any empty affected files collection.
@jenkinsadmin
Copy link
Member

Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests.

@samrocketman
Copy link
Member

CollectionUtils.isNotEmpty (link to javadoc)
Null-safe check if the specified collection is not empty.

Looks OK to me. 👍

@OwensCode
Copy link
Contributor

Looks good to me.

@samrocketman
Copy link
Member

I plan to release this weekend. I'm going to attempt to merge this tomorrow.

samrocketman added a commit that referenced this pull request Mar 2, 2017
@samrocketman samrocketman merged commit 0c6b4a7 into jenkinsci:master Mar 2, 2017
samrocketman added a commit that referenced this pull request Mar 2, 2017
Merge PR #197 Fix #62 by excluding empty affected
@samrocketman samrocketman added this to the slack-2.2 milestone Mar 6, 2017
@samrocketman
Copy link
Member

Feel free to subscribe to #296 for updates related to Slack Plugin 2.2 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants